package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.Store;

public class RemoveStoreCallback extends SequencableRPCCall<Boolean> {
	private Store store;
	private boolean removedState;
	public RemoveStoreCallback(Store store_) {
		store = store_;
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.removeStore(store, this);
	}
	
	public void onSuccess(Boolean result_) {
		removedState = result_;
		callNext();
	}

	public boolean isRemovedState() {
		return removedState;
	}

	public void setRemovedState(boolean removedState) {
		this.removedState = removedState;
	}
	
	
}
